/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.assignment2.student.postgrad;

import za.ac.cput.assignment2.student.Student;

/**
 *
 * @author yandiswa
 */
public class PostGrad extends Student {
     public PostGrad() {
       
    }
    
    public PostGrad(String nm,String studNum,double loan){
        
        super(nm,studNum,loan);  
    }

   
    
    public double interest(){
        
        return super.getLoanAmount() + (super.getLoanAmount()*0.10);
    }
    
    public String toString(){
         String postDetails;
        return postDetails = String.format("Name is : %s\n Student No is: %s\nloan before interest%.2f\nloan after interest is: %.2f",super.getName(),super.getStudNum(),super.getLoanAmount(),interest());
    }
    
}
